Getting Started with PrizmDoc > Integrating the Viewing Client with Your Application > Configuring the Viewing Client Samples > .NET MVC 5 Sample |
The following will route you directly to the Viewing Client sample splash page:
Choice of viewer:
- You can choose to load either the Full Viewer or the Book Reader
- You can choose any of the 5 sample documents (Word, PDF, CAD, Tiff, or JPEG)
- Or, you can upload a document from an arbitrary location on your computer. Note that dragging and dropping a file on this page is not supported in Internet Explorer 8.
If you select Full Viewer on the splash page, then documents will be viewed with the full-featured, out-of-the-box Viewing Client:
If you select Book Reader on the splash page, then documents will be viewed with the book reader. The book reader demonstrates how the Viewing Client can be heavily customized:
The .NET MVC 5 sample is installed under C:\prizm\Samples\dotnet\mvc\. This folder contains all the MVC related folders (Models, Views and Controllers), all the Visual Studio related files and our different viewers which are located on the viewers folder.
In App_Start/RouteConfig.cs you will find one special route called PccViewerServices. This route will catch all requests made to the application that start with pcc/. The {*pathInfo}fragment is very important as it will be needed by our Controller later on.
The PccController handles the requests from the route in the previous section. It simply passes the pathInfo information to our own route handler which will handle the request appropriately.
If you are interested in seeing how we handle the requests, please take a look at the source code in Modes/PccViewer. |
File / Folder |
Description |
viewer-assets folder |
Contains the essential JavaScript, CSS, fonts, images, language data, and templates (HTML) that make up the Viewing Client. |
viewer-assets/less folder |
Contains less that can be used to build the Viewing Client CSS. This folder is non-essential, and does not need to be re-distributed. |
viewer-assets/Gulpfile.js |
Contains Gulp tasks to build the viewer less and icons. This file is non-essential and does not need to be re-distributed. |
viewer-assets/package.json |
A file used by npm (a package manager). It defines the dependencies installed by npm, which are required to run Grunt and compile the less. |
predefinedSearch.json |
This data file contains information defining search queries that will appear as selectable items in the full viewer. Note: This file is consumed by the page Default.aspx and the JSON is injected into the HTML that is returned by Default.aspx. Ultimately, the predefined search terms are provided as a JavaScript hash, when the Viewing Client is created. |
redactionReason.json |
This data file contains information defining redaction reasons that are available in the Viewing Client. Note: This file is consumed by the page Default.aspx and the JSON is injected into the HTML that is returned by Default.aspx. Ultimately, the redaction reasons are provided as a JavaScript hash, when the Viewing Client is created. |
File / Folder |
Description |
viewer-assets folder |
Contains the essential JavaScript, CSS, fonts, images, language data, and templates (HTML) that make up the book reader viewer. |
viewer-assets/less folder |
Contains less that can be used to build the book reader CSS. This folder is non-essential, and does not need to be re-distributed. |
viewer-assets/Gruntifle |
Contains Grunt tasks to build the reader less. This file is non-essential and does not need to be re-distributed. |
viewer-assets/package.json |
A file used by npm (a package manager). It defines the dependencies installed by npm, which are required to run Grunt and compile the less. |
viewer-assets/selection.json |
A file used by the IcoMoon application to generate the icons in the book reader viewer. If you need to add an icon to the Viewing Client, you can add the icon to this file and use the IcoMoon application (https://icomoon.io) to generate a new icon font. This file is non-essential and does not need to be re-distributed. |
viewer-assets/js/sample-config.js |
Contains references to the assets, web tier, and language files used by the Viewing Client in this sample. |
File / Folder |
Description |
modules folder |
Contains uncompiled assets of the Viewing Client. These files will be compiled to viewer-assets/js/bundle.js and viewer-assets/css/bundle.css by the build process defined in Gulpfile.js. The files in this folder are non-essential and do not need to be re-distributed. |
viewer-assets folder |
Contains the essential JavaScript, CSS, fonts, images, language data, and templates (HTML) that make up the Viewing Client. |
Gulpfile.js |
Contains Gulp tasks to build the viewer js and css files. This file is non-essential and does not need to be re-distributed. |
viewer-assets/package.json |
A file used by npm (a package manager). It defines the dependencies installed by npm, which are required to run Gulp and compile the Viewing Client assets. This file is non-essential and does not need to be re-distributed. |
index.html |
The default page for the sample. This page calls the pcc.ashx handler to start a viewing session with the PrizmDoc Application Services and then the page loads the Viewing Client. |
webpack.config.js |
Webpack configuration file. This file contains all the settings for the webpack module bundler. We use webpack to compile all the files in the modules folder to the bundle.js and bundle.css that are found in the viewer-assets folder. |
File / Folder |
Description |
modules folder |
Contains uncompiled assets of the Viewing Client. These files will be compiled to viewer-assets/js/bundle.js and viewer-assets/css/bundle.css by the build process defined in Gulpfile.js. The files in this folder are non-essential and do not need to be re-distributed. |
viewer-assets folder |
Contains the essential JavaScript, CSS, fonts, images, language data, and templates (HTML) that make up the Viewing Client. |
Gulpfile.js |
Contains Gulp tasks to build the viewer js and css files. This file is non-essential and does not need to be re-distributed. |
viewer-assets/package.json |
A file used by npm (a package manager). It defines the dependencies installed by npm, which are required to run Gulp and compile the Viewing Client assets.This file is non-essential and does not need to be re-distributed. |
index.html |
The default page for the sample. This page calls the pcc.ashx handler to start a viewing session with the PrizmDoc Application Services and then the page loads the Viewing Client. |
webpack.config.js |
Webpack configuration file. This file contains all the settings for the webpack module bundler. We use webpack to compile all the files in the modules folder to the bundle.js and bundle.css that are found in the viewer-assets folder. |
The file pcc.config is used to configure the resources and storage used by the Viewing Client web tier. This file can be found in the root of the sample folder This file is self-documenting, but a little information about the configuration options is given below.
<DocumentPath> |
The sample pulls named documents from this location. The DocumentPath must have read/write permissions in order for the file drag and drop functionality of the splash page to work. |
<PrizmApplicationServices[Scheme|Host|Port]> |
Specifies how to connect with the PrizmDoc Application Services. |